<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: pico_platform</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.1.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__pico__platform.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">pico_platform<div class="ingroups"><a class="el" href="group__runtime.html">Runtime Infrastructure</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Macros and definitions (and functions when included by non assembly code) for the RP2 family device / architecture to provide a common abstraction over low level compiler / platform specifics.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga1f7eafa00361375ec15412f634ad67b7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga1f7eafa00361375ec15412f634ad67b7">__fast_mul</a>(a,  b)</td></tr>
<tr class="memdesc:ga1f7eafa00361375ec15412f634ad67b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">multiply two integer values using the fastest method possible  <a href="group__pico__platform.html#ga1f7eafa00361375ec15412f634ad67b7">More...</a><br /></td></tr>
<tr class="separator:ga1f7eafa00361375ec15412f634ad67b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7a3538bc029b0e60c2f308008fc095c6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga7a3538bc029b0e60c2f308008fc095c6">__isr</a></td></tr>
<tr class="memdesc:ga7a3538bc029b0e60c2f308008fc095c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Marker for an interrupt handler.  <a href="group__pico__platform.html#ga7a3538bc029b0e60c2f308008fc095c6">More...</a><br /></td></tr>
<tr class="separator:ga7a3538bc029b0e60c2f308008fc095c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga23eadd8d1642fb8fe4600708c36e116a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">__force_inline</a>&#160;&#160;&#160;__always_inline</td></tr>
<tr class="memdesc:ga23eadd8d1642fb8fe4600708c36e116a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attribute to force inlining of a function regardless of optimization level.  <a href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">More...</a><br /></td></tr>
<tr class="separator:ga23eadd8d1642fb8fe4600708c36e116a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga29022c0c92a05cf88ca5046c59d6f629"><td class="memItemLeft" align="right" valign="top"><a id="ga29022c0c92a05cf88ca5046c59d6f629" name="ga29022c0c92a05cf88ca5046c59d6f629"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>count_of</b>(a)&#160;&#160;&#160;(sizeof(a)/sizeof((a)[0]))</td></tr>
<tr class="memdesc:ga29022c0c92a05cf88ca5046c59d6f629"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro to determine the number of elements in an array. <br /></td></tr>
<tr class="separator:ga29022c0c92a05cf88ca5046c59d6f629"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafa99ec4acc4ecb2dc3c2d05da15d0e3f"><td class="memItemLeft" align="right" valign="top"><a id="gafa99ec4acc4ecb2dc3c2d05da15d0e3f" name="gafa99ec4acc4ecb2dc3c2d05da15d0e3f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX</b>(a,  b)&#160;&#160;&#160;((a)&gt;(b)?(a):(b))</td></tr>
<tr class="memdesc:gafa99ec4acc4ecb2dc3c2d05da15d0e3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro to return the maximum of two comparable values. <br /></td></tr>
<tr class="separator:gafa99ec4acc4ecb2dc3c2d05da15d0e3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3acffbd305ee72dcd4593c0d8af64a4f"><td class="memItemLeft" align="right" valign="top"><a id="ga3acffbd305ee72dcd4593c0d8af64a4f" name="ga3acffbd305ee72dcd4593c0d8af64a4f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MIN</b>(a,  b)&#160;&#160;&#160;((b)&gt;(a)?(a):(b))</td></tr>
<tr class="memdesc:ga3acffbd305ee72dcd4593c0d8af64a4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro to return the minimum of two comparable values. <br /></td></tr>
<tr class="separator:ga3acffbd305ee72dcd4593c0d8af64a4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2d0b8227d9981a22692d5ef6aa1a386f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga2d0b8227d9981a22692d5ef6aa1a386f">__check_type_compatible</a>(type_a,  type_b)&#160;&#160;&#160;static_assert(__builtin_types_compatible_p(type_a, type_b), __STRING(type_a) &quot; is not compatible with &quot; __STRING(type_b));</td></tr>
<tr class="memdesc:ga2d0b8227d9981a22692d5ef6aa1a386f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility macro to assert two types are equivalent.  <a href="group__pico__platform.html#ga2d0b8227d9981a22692d5ef6aa1a386f">More...</a><br /></td></tr>
<tr class="separator:ga2d0b8227d9981a22692d5ef6aa1a386f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga88c6891ab226690c883f3396611d8dc9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga88c6891ab226690c883f3396611d8dc9">__after_data</a>(group)&#160;&#160;&#160;__attribute__((section(&quot;.after_data.&quot; group)))</td></tr>
<tr class="memdesc:ga88c6891ab226690c883f3396611d8dc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Section attribute macro for placement in RAM after the <code>.data</code> section.  <a href="group__pico__platform.html#ga88c6891ab226690c883f3396611d8dc9">More...</a><br /></td></tr>
<tr class="separator:ga88c6891ab226690c883f3396611d8dc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad8b78e068558946081789ce1935528bf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#gad8b78e068558946081789ce1935528bf">__scratch_x</a>(group)&#160;&#160;&#160;__attribute__((section(&quot;.scratch_x.&quot; group)))</td></tr>
<tr class="memdesc:gad8b78e068558946081789ce1935528bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Section attribute macro for placement not in flash (i.e in RAM)  <a href="group__pico__platform.html#gad8b78e068558946081789ce1935528bf">More...</a><br /></td></tr>
<tr class="separator:gad8b78e068558946081789ce1935528bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga699cabffc3896ece6ec696e841146b3c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga699cabffc3896ece6ec696e841146b3c">__scratch_y</a>(group)&#160;&#160;&#160;__attribute__((section(&quot;.scratch_y.&quot; group)))</td></tr>
<tr class="memdesc:ga699cabffc3896ece6ec696e841146b3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Section attribute macro for placement in the SRAM bank 5 (known as "scratch Y")  <a href="group__pico__platform.html#ga699cabffc3896ece6ec696e841146b3c">More...</a><br /></td></tr>
<tr class="separator:ga699cabffc3896ece6ec696e841146b3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga118d39a4ebb425b8bef29e7a1f8731c2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga118d39a4ebb425b8bef29e7a1f8731c2">__uninitialized_ram</a>(group)&#160;&#160;&#160;__attribute__((section(&quot;.uninitialized_data.&quot; #group))) group</td></tr>
<tr class="memdesc:ga118d39a4ebb425b8bef29e7a1f8731c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Section attribute macro for data that is to be left uninitialized.  <a href="group__pico__platform.html#ga118d39a4ebb425b8bef29e7a1f8731c2">More...</a><br /></td></tr>
<tr class="separator:ga118d39a4ebb425b8bef29e7a1f8731c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0f27b5a18b17ef82ff103825a3b7322d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga0f27b5a18b17ef82ff103825a3b7322d">__in_flash</a>(group)&#160;&#160;&#160;__attribute__((section(&quot;.flashdata.&quot; group)))</td></tr>
<tr class="memdesc:ga0f27b5a18b17ef82ff103825a3b7322d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Section attribute macro for placement in flash even in a COPY_TO_RAM binary.  <a href="group__pico__platform.html#ga0f27b5a18b17ef82ff103825a3b7322d">More...</a><br /></td></tr>
<tr class="separator:ga0f27b5a18b17ef82ff103825a3b7322d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad9ab05c9a8f0ab455a5e11773d610787"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#gad9ab05c9a8f0ab455a5e11773d610787">__no_inline_not_in_flash_func</a>(func_name)&#160;&#160;&#160;__noinline __not_in_flash_func(func_name)</td></tr>
<tr class="memdesc:gad9ab05c9a8f0ab455a5e11773d610787"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates a function should not be stored in flash.  <a href="group__pico__platform.html#gad9ab05c9a8f0ab455a5e11773d610787">More...</a><br /></td></tr>
<tr class="separator:gad9ab05c9a8f0ab455a5e11773d610787"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab0d1ba75ceb64131e19f613d7a5313c9"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">__force_inline</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#gab0d1ba75ceb64131e19f613d7a5313c9">tight_loop_contents</a> (void)</td></tr>
<tr class="memdesc:gab0d1ba75ceb64131e19f613d7a5313c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">No-op function for the body of tight loops.  <a href="group__pico__platform.html#gab0d1ba75ceb64131e19f613d7a5313c9">More...</a><br /></td></tr>
<tr class="separator:gab0d1ba75ceb64131e19f613d7a5313c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga49c4fc3b5d3fbe9f2f6f7bc500b9db4f"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga49c4fc3b5d3fbe9f2f6f7bc500b9db4f">busy_wait_at_least_cycles</a> (uint32_t minimum_cycles)</td></tr>
<tr class="memdesc:ga49c4fc3b5d3fbe9f2f6f7bc500b9db4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper method to busy-wait for at least the given number of cycles.  <a href="group__pico__platform.html#ga49c4fc3b5d3fbe9f2f6f7bc500b9db4f">More...</a><br /></td></tr>
<tr class="separator:ga49c4fc3b5d3fbe9f2f6f7bc500b9db4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9837dbd9fd5cc43d4f0fc1f26d046955"><td class="memItemLeft" align="right" valign="top"><a id="ga9837dbd9fd5cc43d4f0fc1f26d046955" name="ga9837dbd9fd5cc43d4f0fc1f26d046955"></a>
static <a class="el" href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">__force_inline</a> void&#160;</td><td class="memItemRight" valign="bottom"><b>__breakpoint</b> (void)</td></tr>
<tr class="memdesc:ga9837dbd9fd5cc43d4f0fc1f26d046955"><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute a breakpoint instruction. <br /></td></tr>
<tr class="separator:ga9837dbd9fd5cc43d4f0fc1f26d046955"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga58434ad816f519308ee02c639b7965bc"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">__force_inline</a> uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga58434ad816f519308ee02c639b7965bc">get_core_num</a> (void)</td></tr>
<tr class="memdesc:ga58434ad816f519308ee02c639b7965bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current core number.  <a href="group__pico__platform.html#ga58434ad816f519308ee02c639b7965bc">More...</a><br /></td></tr>
<tr class="separator:ga58434ad816f519308ee02c639b7965bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1ebeac462e038d7e2ce341df8054f894"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">__force_inline</a> uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga1ebeac462e038d7e2ce341df8054f894">__get_current_exception</a> (void)</td></tr>
<tr class="memdesc:ga1ebeac462e038d7e2ce341df8054f894"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current exception level on this core.  <a href="group__pico__platform.html#ga1ebeac462e038d7e2ce341df8054f894">More...</a><br /></td></tr>
<tr class="separator:ga1ebeac462e038d7e2ce341df8054f894"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga66edd7569f5a42b0a2da43a5926cf064"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">__force_inline</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga66edd7569f5a42b0a2da43a5926cf064">pico_processor_state_is_nonsecure</a> (void)</td></tr>
<tr class="memdesc:ga66edd7569f5a42b0a2da43a5926cf064"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if executing in the NonSecure state (Arm-only)  <a href="group__pico__platform.html#ga66edd7569f5a42b0a2da43a5926cf064">More...</a><br /></td></tr>
<tr class="separator:ga66edd7569f5a42b0a2da43a5926cf064"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga21200eb89a299a9b121d028ad1725fe3"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga21200eb89a299a9b121d028ad1725fe3">rp2350_chip_version</a> (void)</td></tr>
<tr class="memdesc:ga21200eb89a299a9b121d028ad1725fe3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the RP2350 chip revision number.  <a href="group__pico__platform.html#ga21200eb89a299a9b121d028ad1725fe3">More...</a><br /></td></tr>
<tr class="separator:ga21200eb89a299a9b121d028ad1725fe3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac157772e2fa6f4c64e1c3e4d761089d9"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#gac157772e2fa6f4c64e1c3e4d761089d9">rp2040_chip_version</a> (void)</td></tr>
<tr class="memdesc:gac157772e2fa6f4c64e1c3e4d761089d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the RP2040 chip revision number for compatibility.  <a href="group__pico__platform.html#gac157772e2fa6f4c64e1c3e4d761089d9">More...</a><br /></td></tr>
<tr class="separator:gac157772e2fa6f4c64e1c3e4d761089d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadcb55b507bb15fbe5a71bcb2f222b6e2"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#gadcb55b507bb15fbe5a71bcb2f222b6e2">rp2040_rom_version</a> (void)</td></tr>
<tr class="memdesc:gadcb55b507bb15fbe5a71bcb2f222b6e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the RP2040 rom version number.  <a href="group__pico__platform.html#gadcb55b507bb15fbe5a71bcb2f222b6e2">More...</a><br /></td></tr>
<tr class="separator:gadcb55b507bb15fbe5a71bcb2f222b6e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab68b1653c84bff361bff5dc2baf2e7ea"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">__force_inline</a> int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#gab68b1653c84bff361bff5dc2baf2e7ea">__mul_instruction</a> (int32_t a, int32_t b)</td></tr>
<tr class="memdesc:gab68b1653c84bff361bff5dc2baf2e7ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiply two integers using an assembly <code>MUL</code> instruction.  <a href="group__pico__platform.html#gab68b1653c84bff361bff5dc2baf2e7ea">More...</a><br /></td></tr>
<tr class="separator:gab68b1653c84bff361bff5dc2baf2e7ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac01ec0ae597f7572f8e298fa4f48c8e6"><td class="memItemLeft" align="right" valign="top">static __always_inline void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#gac01ec0ae597f7572f8e298fa4f48c8e6">__compiler_memory_barrier</a> (void)</td></tr>
<tr class="memdesc:gac01ec0ae597f7572f8e298fa4f48c8e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ensure that the compiler does not move memory access across this method call.  <a href="group__pico__platform.html#gac01ec0ae597f7572f8e298fa4f48c8e6">More...</a><br /></td></tr>
<tr class="separator:gac01ec0ae597f7572f8e298fa4f48c8e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga29ba8f40ca0c961e04c7380a3665e612"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#ga29ba8f40ca0c961e04c7380a3665e612">panic_unsupported</a> (void)</td></tr>
<tr class="memdesc:ga29ba8f40ca0c961e04c7380a3665e612"><td class="mdescLeft">&#160;</td><td class="mdescRight">Panics with the message "Unsupported".  <a href="group__pico__platform.html#ga29ba8f40ca0c961e04c7380a3665e612">More...</a><br /></td></tr>
<tr class="separator:ga29ba8f40ca0c961e04c7380a3665e612"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad1f1a1dc0581a11b597453f148106393"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__platform.html#gad1f1a1dc0581a11b597453f148106393">panic</a> (const char *fmt,...)</td></tr>
<tr class="memdesc:gad1f1a1dc0581a11b597453f148106393"><td class="mdescLeft">&#160;</td><td class="mdescRight">Displays a panic message and halts execution.  <a href="group__pico__platform.html#gad1f1a1dc0581a11b597453f148106393">More...</a><br /></td></tr>
<tr class="separator:gad1f1a1dc0581a11b597453f148106393"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p >Macros and definitions (and functions when included by non assembly code) for the RP2 family device / architecture to provide a common abstraction over low level compiler / platform specifics. </p>
<p >Macros and definitions (and functions when included by non assembly code) to adapt for different compilers.</p>
<p >Macros and definitions for accessing the CPU registers.</p>
<p >This header may be included by assembly code </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga88c6891ab226690c883f3396611d8dc9" name="ga88c6891ab226690c883f3396611d8dc9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga88c6891ab226690c883f3396611d8dc9">&#9670;&nbsp;</a></span>__after_data</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __after_data</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">group</td><td>)</td>
          <td>&#160;&#160;&#160;__attribute__((section(&quot;.after_data.&quot; group)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Section attribute macro for placement in RAM after the <code>.data</code> section. </p>
<p >For example a 400 element <code>uint32_t</code> array placed after the .data section </p><pre class="fragment">uint32_t __after_data("my_group_name") a_big_array[400];
</pre><p> The section attribute is <code>.after_data.&lt;group&gt;</code></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">group</td><td>a string suffix to use in the section name to distinguish groups that can be linker garbage-collected independently </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga2d0b8227d9981a22692d5ef6aa1a386f" name="ga2d0b8227d9981a22692d5ef6aa1a386f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2d0b8227d9981a22692d5ef6aa1a386f">&#9670;&nbsp;</a></span>__check_type_compatible</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __check_type_compatible</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type_a, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type_b&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;static_assert(__builtin_types_compatible_p(type_a, type_b), __STRING(type_a) &quot; is not compatible with &quot; __STRING(type_b));</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Utility macro to assert two types are equivalent. </p>
<p >This macro can be useful in other macros along with <code>typeof</code> to assert that two parameters are of equivalent type (or that a single parameter is of an expected type) </p>

</div>
</div>
<a id="ga1f7eafa00361375ec15412f634ad67b7" name="ga1f7eafa00361375ec15412f634ad67b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1f7eafa00361375ec15412f634ad67b7">&#9670;&nbsp;</a></span>__fast_mul</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __fast_mul</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">b&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">    __builtin_choose_expr(__builtin_constant_p(b) &amp;&amp; !__builtin_constant_p(a), \</div>
<div class="line">    (__builtin_popcount(b) &gt;= 2 ? <a class="code hl_function" href="group__pico__platform.html#gab68b1653c84bff361bff5dc2baf2e7ea">__mul_instruction</a>(a,b) : (a)*(b)), \</div>
<div class="line">    (a)*(b))</div>
<div class="ttc" id="agroup__pico__platform_html_gab68b1653c84bff361bff5dc2baf2e7ea"><div class="ttname"><a href="group__pico__platform.html#gab68b1653c84bff361bff5dc2baf2e7ea">__mul_instruction</a></div><div class="ttdeci">static __force_inline int32_t __mul_instruction(int32_t a, int32_t b)</div><div class="ttdoc">Multiply two integers using an assembly MUL instruction.</div><div class="ttdef"><b>Definition:</b> platform.h:258</div></div>
</div><!-- fragment -->
<p>multiply two integer values using the fastest method possible </p>
<p >Efficiently multiplies value a by possibly constant value b.</p>
<p >If b is known to be constant and not zero or a power of 2, then a mul instruction is used rather than gcc's default which is often a slow combination of shifts and adds. If b is a power of 2 then a single shift is of course preferable and will be used</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>the first operand </td></tr>
    <tr><td class="paramname">b</td><td>the second operand </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a * b </dd></dl>

</div>
</div>
<a id="ga23eadd8d1642fb8fe4600708c36e116a" name="ga23eadd8d1642fb8fe4600708c36e116a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga23eadd8d1642fb8fe4600708c36e116a">&#9670;&nbsp;</a></span>__force_inline</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __force_inline&#160;&#160;&#160;__always_inline</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Attribute to force inlining of a function regardless of optimization level. </p>
<p >For example my_function here will always be inlined: </p><pre class="fragment">int __force_inline my_function(int x) {
</pre> 
</div>
</div>
<a id="ga0f27b5a18b17ef82ff103825a3b7322d" name="ga0f27b5a18b17ef82ff103825a3b7322d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0f27b5a18b17ef82ff103825a3b7322d">&#9670;&nbsp;</a></span>__in_flash</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __in_flash</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">group</td><td>)</td>
          <td>&#160;&#160;&#160;__attribute__((section(&quot;.flashdata.&quot; group)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Section attribute macro for placement in flash even in a COPY_TO_RAM binary. </p>
<p >For example a <code>uint32_t</code> variable explicitly placed in flash (it will hard fault if you attempt to write it!) </p><pre class="fragment">uint32_t __in_flash("my_group_name") foo = 23;
</pre><p> The section attribute is <code>.flashdata.&lt;group&gt;</code></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">group</td><td>a string suffix to use in the section name to distinguish groups that can be linker garbage-collected independently </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga7a3538bc029b0e60c2f308008fc095c6" name="ga7a3538bc029b0e60c2f308008fc095c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7a3538bc029b0e60c2f308008fc095c6">&#9670;&nbsp;</a></span>__isr</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __isr</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">void</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Marker for an interrupt handler. </p>
<p >For example an IRQ handler function called my_interrupt_handler: </p><pre class="fragment">void __isr my_interrupt_handler(void) {
</pre> 
</div>
</div>
<a id="gad9ab05c9a8f0ab455a5e11773d610787" name="gad9ab05c9a8f0ab455a5e11773d610787"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad9ab05c9a8f0ab455a5e11773d610787">&#9670;&nbsp;</a></span>__no_inline_not_in_flash_func</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __no_inline_not_in_flash_func</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">func_name</td><td>)</td>
          <td>&#160;&#160;&#160;__noinline __not_in_flash_func(func_name)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Indicates a function should not be stored in flash. </p>
<p >Decorates a function name, such that the function will execute from RAM (assuming it is not inlined into a flash function by the compiler)</p>
<p >For example a function called my_func taking an int parameter: </p><pre class="fragment">void __not_in_flash_func(my_func)(int some_arg) {
</pre><p> The function is placed in the <code>.time_critical.&lt;func_name&gt;</code> linker section</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__platform.html#gad9ab05c9a8f0ab455a5e11773d610787" title="Indicates a function should not be stored in flash.">__no_inline_not_in_flash_func</a></dd></dl>
<p>Indicates a function is time/latency critical and should not run from flash</p>
<p >Decorates a function name, such that the function will execute from RAM (assuming it is not inlined into a flash function by the compiler) to avoid possible flash latency. Currently this macro is identical in implementation to <code>__not_in_flash_func</code>, however the semantics are distinct and a <code>__time_critical_func</code> may in the future be treated more specially to reduce the overhead when calling such function from a flash function.</p>
<p >For example a function called my_func taking an int parameter: </p><pre class="fragment">void __time_critical_func(my_func)(int some_arg) {
</pre><p> The function is placed in the <code>.time_critical.&lt;func_name&gt;</code> linker section</p>
<dl class="section see"><dt>See also</dt><dd>__not_in_flash_func</dd></dl>
<p>Indicate a function should not be stored in flash and should not be inlined</p>
<p >Decorates a function name, such that the function will execute from RAM, explicitly marking it as noinline to prevent it being inlined into a flash function by the compiler</p>
<p >For example a function called my_func taking an int parameter: </p><pre class="fragment">void __no_inline_not_in_flash_func(my_func)(int some_arg) {
</pre><p> The function is placed in the <code>.time_critical.&lt;func_name&gt;</code> linker section </p>

</div>
</div>
<a id="gad8b78e068558946081789ce1935528bf" name="gad8b78e068558946081789ce1935528bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad8b78e068558946081789ce1935528bf">&#9670;&nbsp;</a></span>__scratch_x</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __scratch_x</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">group</td><td>)</td>
          <td>&#160;&#160;&#160;__attribute__((section(&quot;.scratch_x.&quot; group)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Section attribute macro for placement not in flash (i.e in RAM) </p>
<p >For example a 3 element <code>uint32_t</code> array placed in RAM (even though it is <code>static const</code>) </p><pre class="fragment">static const uint32_t __not_in_flash("my_group_name") an_array[3];
</pre><p> The section attribute is <code>.time_critical.&lt;group&gt;</code></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">group</td><td>a string suffix to use in the section name to distinguish groups that can be linker garbage-collected independently</td></tr>
  </table>
  </dd>
</dl>
<p>Section attribute macro for placement in the SRAM bank 4 (known as "scratch X")</p>
<p >Scratch X is commonly used for critical data and functions accessed only by one core (when only one core is accessing the RAM bank, there is no opportunity for stalls)</p>
<p >For example a <code>uint32_t</code> variable placed in "scratch X" </p><pre class="fragment">uint32_t __scratch_x("my_group_name") foo = 23;
</pre><p> The section attribute is <code>.scratch_x.&lt;group&gt;</code></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">group</td><td>a string suffix to use in the section name to distinguish groups that can be linker garbage-collected independently </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga699cabffc3896ece6ec696e841146b3c" name="ga699cabffc3896ece6ec696e841146b3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga699cabffc3896ece6ec696e841146b3c">&#9670;&nbsp;</a></span>__scratch_y</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __scratch_y</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">group</td><td>)</td>
          <td>&#160;&#160;&#160;__attribute__((section(&quot;.scratch_y.&quot; group)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Section attribute macro for placement in the SRAM bank 5 (known as "scratch Y") </p>
<p >Scratch Y is commonly used for critical data and functions accessed only by one core (when only one core is accessing the RAM bank, there is no opportunity for stalls)</p>
<p >For example a <code>uint32_t</code> variable placed in "scratch Y" </p><pre class="fragment">uint32_t __scratch_y("my_group_name") foo = 23;
</pre><p> The section attribute is <code>.scratch_y.&lt;group&gt;</code></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">group</td><td>a string suffix to use in the section name to distinguish groups that can be linker garbage-collected independently </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga118d39a4ebb425b8bef29e7a1f8731c2" name="ga118d39a4ebb425b8bef29e7a1f8731c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga118d39a4ebb425b8bef29e7a1f8731c2">&#9670;&nbsp;</a></span>__uninitialized_ram</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __uninitialized_ram</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">group</td><td>)</td>
          <td>&#160;&#160;&#160;__attribute__((section(&quot;.uninitialized_data.&quot; #group))) group</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Section attribute macro for data that is to be left uninitialized. </p>
<p >Data marked this way will retain its value across a reset (normally uninitialized data - in the .bss section) is initialized to zero during runtime initialization</p>
<p >For example a <code>uint32_t</code> foo that will retain its value if the program is restarted by reset. </p><pre class="fragment">uint32_t __uninitialized_ram(foo);
</pre><p> The section attribute is <code>.uninitialized_data.&lt;group&gt;</code></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">group</td><td>a string suffix to use in the section name to distinguish groups that can be linker garbage-collected independently </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gac01ec0ae597f7572f8e298fa4f48c8e6" name="gac01ec0ae597f7572f8e298fa4f48c8e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac01ec0ae597f7572f8e298fa4f48c8e6">&#9670;&nbsp;</a></span>__compiler_memory_barrier()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static __always_inline void __compiler_memory_barrier </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Ensure that the compiler does not move memory access across this method call. </p>
<p >For example in the following code: </p><pre class="fragment">*some_memory_location = var_a;
__compiler_memory_barrier();
uint32_t var_b = *some_other_memory_location
</pre><p> The compiler will not move the load from <code>some_other_memory_location</code> above the memory barrier (which it otherwise might - even above the memory store!) </p>

</div>
</div>
<a id="ga1ebeac462e038d7e2ce341df8054f894" name="ga1ebeac462e038d7e2ce341df8054f894"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1ebeac462e038d7e2ce341df8054f894">&#9670;&nbsp;</a></span>__get_current_exception()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">__force_inline</a> uint __get_current_exception </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the current exception level on this core. </p>
<p >On Cortex-M this is the exception number defined in the architecture reference, which is equal to VTABLE_FIRST_IRQ + irq num if inside an interrupt handler. (VTABLE_FIRST_IRQ is defined in platform_defs.h).</p>
<p >On Hazard3, this function returns VTABLE_FIRST_IRQ + irq num if inside of an external IRQ handler (or a fault from such a handler), and 0 otherwise, generally aligning with the Cortex-M values.</p>
<dl class="section return"><dt>Returns</dt><dd>the exception number if the CPU is handling an exception, or 0 otherwise </dd></dl>

</div>
</div>
<a id="gab68b1653c84bff361bff5dc2baf2e7ea" name="gab68b1653c84bff361bff5dc2baf2e7ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab68b1653c84bff361bff5dc2baf2e7ea">&#9670;&nbsp;</a></span>__mul_instruction()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">__force_inline</a> int32_t __mul_instruction </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Multiply two integers using an assembly <code>MUL</code> instruction. </p>
<p >This multiplies a by b using multiply instruction using the ARM mul instruction regardless of values (the compiler might otherwise choose to perform shifts/adds), i.e. this is a 1 cycle operation.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>the first operand </td></tr>
    <tr><td class="paramname">b</td><td>the second operand </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a * b </dd></dl>

</div>
</div>
<a id="ga49c4fc3b5d3fbe9f2f6f7bc500b9db4f" name="ga49c4fc3b5d3fbe9f2f6f7bc500b9db4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga49c4fc3b5d3fbe9f2f6f7bc500b9db4f">&#9670;&nbsp;</a></span>busy_wait_at_least_cycles()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void busy_wait_at_least_cycles </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>minimum_cycles</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Helper method to busy-wait for at least the given number of cycles. </p>
<p >This method is useful for introducing very short delays.</p>
<p >This method busy-waits in a tight loop for the given number of system clock cycles. The total wait time is only accurate to within 2 cycles, and this method uses a loop counter rather than a hardware timer, so the method will always take longer than expected if an interrupt is handled on the calling core during the busy-wait; you can of course disable interrupts to prevent this.</p>
<p >You can use clock_get_hz(clk_sys) to determine the number of clock cycles per second if you want to convert an actual time duration to a number of cycles.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">minimum_cycles</td><td>the minimum number of system clock cycles to delay for </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga58434ad816f519308ee02c639b7965bc" name="ga58434ad816f519308ee02c639b7965bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga58434ad816f519308ee02c639b7965bc">&#9670;&nbsp;</a></span>get_core_num()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">__force_inline</a> uint get_core_num </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the current core number. </p>
<dl class="section return"><dt>Returns</dt><dd>The core number the call was made from </dd></dl>

</div>
</div>
<a id="gad1f1a1dc0581a11b597453f148106393" name="gad1f1a1dc0581a11b597453f148106393"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad1f1a1dc0581a11b597453f148106393">&#9670;&nbsp;</a></span>panic()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void panic </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Displays a panic message and halts execution. </p>
<p >An attempt is made to output the message to all registered STDOUT drivers after which this method executes a BKPT instruction.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fmt</td><td>format string (printf-like) </td></tr>
    <tr><td class="paramname">...</td><td>printf-like arguments </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga29ba8f40ca0c961e04c7380a3665e612" name="ga29ba8f40ca0c961e04c7380a3665e612"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga29ba8f40ca0c961e04c7380a3665e612">&#9670;&nbsp;</a></span>panic_unsupported()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void panic_unsupported </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Panics with the message "Unsupported". </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__platform.html#gad1f1a1dc0581a11b597453f148106393" title="Displays a panic message and halts execution.">panic</a> </dd></dl>

</div>
</div>
<a id="ga66edd7569f5a42b0a2da43a5926cf064" name="ga66edd7569f5a42b0a2da43a5926cf064"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga66edd7569f5a42b0a2da43a5926cf064">&#9670;&nbsp;</a></span>pico_processor_state_is_nonsecure()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">__force_inline</a> bool pico_processor_state_is_nonsecure </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return true if executing in the NonSecure state (Arm-only) </p>
<dl class="section return"><dt>Returns</dt><dd>True if currently executing in the NonSecure state on an Arm processor </dd></dl>

</div>
</div>
<a id="gac157772e2fa6f4c64e1c3e4d761089d9" name="gac157772e2fa6f4c64e1c3e4d761089d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac157772e2fa6f4c64e1c3e4d761089d9">&#9670;&nbsp;</a></span>rp2040_chip_version()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t rp2040_chip_version </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the RP2040 chip revision number for compatibility. </p>
<dl class="section return"><dt>Returns</dt><dd>2 RP2040 errata fixed in B2 are fixed in RP2350 </dd></dl>

</div>
</div>
<a id="gadcb55b507bb15fbe5a71bcb2f222b6e2" name="gadcb55b507bb15fbe5a71bcb2f222b6e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadcb55b507bb15fbe5a71bcb2f222b6e2">&#9670;&nbsp;</a></span>rp2040_rom_version()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t rp2040_rom_version </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the RP2040 rom version number. </p>
<dl class="section return"><dt>Returns</dt><dd>the RP2040 rom version number (1 for RP2040-B0, 2 for RP2040-B1, 3 for RP2040-B2) </dd></dl>

</div>
</div>
<a id="ga21200eb89a299a9b121d028ad1725fe3" name="ga21200eb89a299a9b121d028ad1725fe3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga21200eb89a299a9b121d028ad1725fe3">&#9670;&nbsp;</a></span>rp2350_chip_version()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t rp2350_chip_version </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the RP2350 chip revision number. </p>
<dl class="section return"><dt>Returns</dt><dd>the RP2350 chip revision number (1 for B0/B1, 2 for B2) </dd></dl>

</div>
</div>
<a id="gab0d1ba75ceb64131e19f613d7a5313c9" name="gab0d1ba75ceb64131e19f613d7a5313c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab0d1ba75ceb64131e19f613d7a5313c9">&#9670;&nbsp;</a></span>tight_loop_contents()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__pico__platform.html#ga23eadd8d1642fb8fe4600708c36e116a">__force_inline</a> void tight_loop_contents </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>No-op function for the body of tight loops. </p>
<p >No-op function intended to be called by any tight hardware polling loop. Using this ubiquitously makes it much easier to find tight loops, but also in the future #ifdef-ed support for lockup debugging might be added </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>